//#include "iostream"


#include "tuples.h"
int main()
{

    void DisMatrix(ElemType con_matrix[][8]);

    ElemType matrix[M][N]={{0,0,-3,0,0,0,0,0},{0,0,0,0,0,0,37,0},{0,0,0,0,0,0,0,0},{0,0,0,24,0,0,0,0},
                        {0,0,0,0,0,0,0,0},{0,15,0,0,0,0,0,0},{0,0,0,0,0,0,88,0},{0,0,0,0,0,0,0,0}};
    int select;//用于转置方式的选择
    TSMatrix tsMatrix,tsMatrix1;
    puts("初始矩阵为：");
    DisMatrix(matrix);

    CreateMat(tsMatrix,matrix);
    puts("矩阵的三元组顺序表为：");
    DisMat(tsMatrix);

    puts("有两种转置方式(0为普通转置，1为快速转置)，输入所需转置方式对应数字即可");
    scanf("%d",&select);
    select? FastTranTat(tsMatrix,tsMatrix1):TranTat(tsMatrix,tsMatrix1);
    puts("对矩阵三元组顺序表进行转置,转置后的三元组为：");
    DisMat(tsMatrix1);
    puts("三元组顺序表转置后对应的矩阵");
    DisMatMatrix(tsMatrix1);
}

